//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by dllo on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setPf_x:(CGFloat)pf_x {
    CGRect rect = self.frame;
    rect.origin.x = pf_x;
    self.frame = rect;
}
- (CGFloat)pf_x {
    return self.frame.origin.x;
}

- (void)setPf_y:(CGFloat)pf_y {
    CGRect rect = self.frame;
    rect.origin.y = pf_y;
    self.frame = rect;
}
- (CGFloat)pf_y {
    return self.frame.origin.y;
}

- (void)setPf_width:(CGFloat)pf_width {
    CGRect rect = self.frame;
    rect.size.width = pf_width;
    self.frame = rect;
}
- (CGFloat)pf_width {
    return self.frame.size.width;
}

- (void)setPf_height:(CGFloat)pf_height {
    CGRect rect = self.frame;
    rect.size.height = pf_height;
    self.frame = rect;
}
- (CGFloat)pf_height {
    return self.frame.size.height;
}

- (void)setPf_centerX:(CGFloat)pf_centerX {
    CGPoint center = self.center;
    center.x = pf_centerX;
    self.center = center;
    
}
- (CGFloat)pf_centerX {
    return self.center.x;
}

- (void)setPf_centerY:(CGFloat)pf_centerY {
    CGPoint center = self.center;
    center.y = pf_centerY;
    self.center = center;
}

- (CGFloat)pf_centerY {
    return self.center.y;
}
@end
